import instance from "./axios";
const adminLogin = (data) => {
    return instance.request({
        url: '',
        method: 'post',
        data
    })
}
const categoryPage = (data) => {
    //返回Promise对象
    return instance.request({
        url: 'mall/cms-topic-category/page', //fullpath=baseURL+url  http://api.jqrjq.cn/api/mobile/elogin
        method: 'post',
        data,

    })

}
const categoryDelId = (params) => {
    return instance.request({
        url: 'mall/cms-topic-category/del/'+params,
    })
}
const categoryAdd = (data) => {
    return instance.request({
        url: 'mall/cms-topic-category/add',
        method: 'post',
        data
    })
}
const categoryEdit = (data) => {
    return instance.request({
        url: 'mall/cms-topic-category/edit',
        method: 'post',
        data
    })
}
const categoryseek = (id) => {
    return instance.request({
        url: 'mall/cms-topic-category/one/'+id, 
        method: 'post',
        id
    })
}

export {
    categoryPage,
    categoryseek,
    adminLogin,
    categoryDelId,
    categoryAdd,
    categoryEdit
} 